<%@page import="com.kaishengit.dao.ProdDao"%> 
<%@page import="com.kaishengit.entity.Prod"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'update.jsp' starting page</title>
  </head>
  <body>
	<%@ include file="top.jsp" %>
	<%
		String id = request.getParameter("id");
		Prod prod = new ProdDao().findById(Integer.parseInt(id));
		
	 %>
	 <div class="container" style="padding-top:40px">
	 	<form action="prod.jspx?m=update" method="post" class="form-horizontal">
	 		<fieldset>
				
		 		<legend style="color:red">修改商品信息</legend>
				<input type="hidden" name="id" value="<%=prod.getId()%>">		 			
		 		<div class="control-group">
		 			<label class="control-label">商品名称</label>
	 				<div class="controls">
						<input style="height:30px" type="text" name="prodname" value="<%=prod.getProdname()%>">		 		
		 			</div>
		 		</div>
		 		
		 		<div class="control-group">
		 			<label class="control-label">商品价格</label>
		 			<div class="controls">
		 				<input style="height:30px" type="text" name="price" value="<%=prod.getPrice()%>">
		 			</div>
		 		</div>
		 		
		 		<div class="form-actions span4">
		 			<input type="submit" value="修改" class="btn btn-danger">
		 			<button class="btn"><a href="prod.jspx">返回</a></button>
		 		</div>
		 			 	
	 		</fieldset>
	 	
	 	</form>
	 	
	 </div>
	   </body>
</html>
